﻿using MS.InformationManagement.Presenter.Support;
using MS.InformationManagement.BLL.SimpleSearch;

namespace MS.InformationManagement.Presenter.SearchRefinementPanel
{
    public class SearchRefinementPanelPresenter : BasePresenter<ISearchRefinementPanelView>
    {
        public SearchRefinementPanelPresenter(ISearchRefinementPanelView view) : base(view) { }

        public void FetchSearchHistory(int userID) {
            int totalRecords;
            View.SearchHistoryCollection =  SimpleSearchBLL.GetPastSearch(userID, View.PageIndex, View.PageSize, out totalRecords);
            View.TotalRecords = totalRecords;
        }
    }
}
